package org.zyl.springboot.mybatis.template.modules.user.controller;

import java.util.HashMap;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.zyl.springboot.mybatis.template.modules.user.mapper.UserMapper;
import org.zyl.util.map.MapControl;

import net.sf.json.JSONArray;

@RestController
@RequestMapping("/user/")
public class UserController {
	
	@Resource
	private UserMapper userMapper;

	@RequestMapping("/list.html")
	public String list() {
		return JSONArray.fromObject(userMapper.query(MapControl.getControl().getMap())).toString();
	}
	@RequestMapping("/query.html")
	public String query(HttpServletRequest request) {
		return JSONArray.fromObject(new HashMap<>()).toString();
	}
}